package com.atguigu.exam.service;

import com.atguigu.exam.entity.ExamRecord;
import com.atguigu.exam.vo.StartExamVo;
import com.atguigu.exam.vo.SubmitAnswerVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 考试服务接口
 */
public interface ExamService extends IService<ExamRecord> {

    /**
     * 开始一场考试
     * @param startExamVo
     * @return
     */
    ExamRecord startExam(StartExamVo startExamVo);

    /**
     * 提交考试答案
     * @param examRecordId
     * @param answers
     */
    void submitAnswer(Integer examRecordId, List<SubmitAnswerVo> answers);

    /**
     * 获取考试记录详情（包含试卷信息和答题记录）
     * @param id
     * @return
     */
    ExamRecord getExamRecordDetail(Integer id);

    /**
     * ai自动判卷
     * @param examRecordId
     * @return
     */
    ExamRecord gradeExam(Integer examRecordId);
}
 